<?php

$pages = Controller::pages();
$active_page = $this->request->params[0];

if($this->request->controller=="admin" && $this->request->action=="contact"){
	$active_page = "contact";
}

?>

<ul id="menu">
	<?php foreach($pages as $key=>$label): ?>
		<li<?php if($key==$active_page): ?> class="selected"<?php endif; ?>>
			<?php if($key!=$active_page): ?>
				<a href="/page/show/<?php echo $key; ?>"><?php __($label); ?></a>
			<?php else: ?>
				<strong><?php __($label); ?></strong>
			<?php endif; ?>
		</li>
	<?php endforeach; ?>
</ul>
<script type="text/javascript">
$(function(){
	$("#menu a").each(function(){
		$(this).mouseover(function(){$(this).parent().addClass("hover");});
		$(this).mouseout(function(){$(this).parent().removeClass("hover");});
	});
});
</script>